<template>
	<view class="container">
		<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000" :duration="500">
			<swiper-item @click="goDetail(1)">
				<image class="swiper-img" src="/static/1.png"></image>
			</swiper-item>
			<swiper-item @click="goDetail(2)">
				<image class="swiper-img" src="/static/2.png"></image>
			</swiper-item>
		</swiper>
		
		
		
		<button class="btn" @click="goPage('hex')">RGB转16进制</button>
		<button class="btn" @click="goPage('chat')">沟通扑克牌</button>
		<button class="btn" @click="goPage('qrcode')">生成二维码</button>
	</view>
</template>

<script>
	export default {
	
		methods: {
			goPage(type){
				uni.navigateTo({
					url: `/pages/index/${type}`
				})
			},
			goDetail(id){
				uni.navigateTo({
					url: `/pages/index/detail?src=/static/${id}.png`
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.swiper {
		width: 100%;
		height: 420rpx;
		.swiper-img{
			width: 100%;
		}
	}
</style>
